package com.goodboys.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.goodboys.base.entity.BaseBean;

import java.util.Date;
import java.util.List;

public class User extends BaseBean<User>{
    private String id;

    private String name;

    private  String pwd;

    private String phone;

    private Integer gender;

    private String intro;

    private String img;

    private Double avgScore;

    private String address;

    private Integer tag;

    private Double lng;

    private Double lat;

    private Integer type;
    @JSONField (format="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date lastTime;

    private String token;

    private Integer distance;

    private List<Info> infos;

    private String keyword;//在webscoket记录用户值使用

    private Integer range;//在webscoket记录用户值使用

    private String sessionId;//在webscoket记录用户值使用

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Integer getRange() {
        return (range==null)?100:range;
    }

    public void setRange(Integer range) {
        this.range = range;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public List<Info> getInfos() {
        return infos;
    }

    public void setInfos(List<Info> infos) {
        this.infos = infos;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public User() {

    }

    public Integer getDistance() {
        return distance;
    }

    public void setDistance(Integer distance) {
        this.distance = distance;
    }

    public User(String id, String name, String pwd, String phone, Integer gender, String intro, String img, Double avgScore, String address, Integer tag, Double lng, Double lat, Integer type, Date updateTime, Date lastTime) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;
        this.phone = phone;
        this.gender = gender;
        this.intro = intro;
        this.img = img;
        this.avgScore = avgScore;
        this.address = address;
        this.tag = tag;
        this.lng = lng;
        this.lat = lat;
        this.type = type;
        this.updateTime = updateTime;
        this.lastTime = lastTime;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro == null ? null : intro.trim();
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img == null ? null : img.trim();
    }

    public Double getAvgScore() {
        return avgScore;
    }

    public void setAvgScore(Double avgScore) {
        this.avgScore = avgScore;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public Integer getTag() {
        return (tag == null) ? 0 : tag;
    }

    public void setTag(Integer tag) {
        this.tag = tag;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public Integer getType() {
        return (type == null) ? 0 : type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", phone='" + phone + '\'' +
                ", gender=" + gender +
                ", intro='" + intro + '\'' +
                ", img='" + img + '\'' +
                ", avgScore=" + avgScore +
                ", address='" + address + '\'' +
                ", tag=" + tag +
                ", lng=" + lng +
                ", lat=" + lat +
                ", type=" + type +
                ", updateTime=" + updateTime +
                ", lastTime=" + lastTime +
                ", token='" + token + '\'' +
                ", distance=" + distance +
                ", infos=" + infos +
                ", keyword='" + keyword + '\'' +
                ", range=" + range +
                ", sessionId='" + sessionId + '\'' +
                '}';
    }
}